package com.ethan.valid.controller;

import com.ethan.valid.dto.LoginDTO;
import com.ethan.valid.vo.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: ethan.liu
 * @Date: 2020/10/15 17:05
 */
@RestController
@RequestMapping("api")
public class LoinController {
    @PostMapping("login")
    public R login(@RequestBody @Validated LoginDTO loginDTO){
        return new R(1,loginDTO,"success");
    }
    @GetMapping("mytest")
    public R login(){
        return new R(1,"","success");
    }
}
